package com.example.controller;

import com.example.service.VerifyService;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * @ClassName ApiController
 * @Description 实现注册列表
 * @Author Hauen
 * @Date 2022/11/29 23:26
 * @Version 1.0
 */
@RestController
@RequestMapping("/api/auth")
public class ApiController {

    @Resource
    VerifyService service;

    @RequestMapping("/verify-code")
    public void verifyCode(@RequestParam("email") String email){

        service.sendVerifyCode(email);
    }

//    @RequestMapping(value = "/register")
//    public void register(String username,
//                         String password,
//                         String email,
//                         String verify){
//        if (service.doVerify(email,verify)){
//            System.out.println("注册成功");
//        }else {
//            System.out.println("注册失败");
//        }
//    }
}
